<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>后台用户管理-<?php echo (C("cms_name")); ?></title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<link rel='stylesheet' type='text/css' href='__PUBLIC__/Admin/css/admin_style.css' />
	<script type="text/javascript" src="__PUBLIC__/js/jquery.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/Admin/js/function.js"></script>
	<script charset="utf-8" src="__PUBLIC__/vendor/datepicker/WdatePicker.js"></script>
	<style>td{ height:22px; line-height:22px}</style>
</head>
<style>
	.ttr{background: #fff;}
	.ttr .tdt{font-weight: bold;}
</style>
<body>
		<table width="98%" border="0" cellpadding="9" cellspacing="1" class="table">
		<tr>
			<td colspan="3" class="table_title">
				<span class="fl">地区信息</span>
				<span class="fr">
					
					<form action="<?php echo U('City/add');?>" method="post"  onSubmit="return ajaxForm(this)">
					新增<?php echo ($t); ?>
						<input type="text" name="region_name" />
						<input type="hidden" name="parent_id" value="<?php echo (($_GET['id'])?($_GET['id']):0); ?>" />
						<input type="hidden" name="level" value="<?php echo ($region[level] +1); ?>" />

						<input type="submit"  value="新增" />
					</form>
				</span>

			</td>
		</tr>


		<tr class="tr ct">
          <td colspan="3" valign="middle">
            [<?php echo ($region[region_name]); ?>]	<?php echo ($t); ?>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="<?php echo U('City/index',array('id'=>$region[parent_id]));?>">返回上一级</a>
          </td>
        </tr>

		<?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i; if($i == 1): ?><tr class="tr ct"><?php endif; ?>

			<td valign="middle">
           		<?php echo ($vo["region_name"]); ?> <?php if($vo[level] < 3): ?><a href="<?php echo U('City/index',array('id'=>$vo[region_id]));?>">管理</a><?php endif; ?>

           			<a href="javascript:void(0)" onclick="return confirmurl('<?php echo U('City/del/',array('id'=>$vo['region_id']));?>','确定删除该地区吗？')">删除</a>
          	</td>
			
	
			
			<?php if($i % 3 == 0 || $i == count($list)): ?></tr><?php endif; ?>
			<?php if($i % 3 == 0): ?><tr class="tr ct"><?php endif; endforeach; endif; else: echo "" ;endif; ?>
		
			
		

		
		</table>
		<script>var version='<?php echo (C("cms_var")); ?>';</script>
		<style>
#footer, #footer a:link, #footer a:visited {
	clear:both;
	color:#0072e3;
	font:12px/1.5 Arial;
	margin-top:10px;
	text-align:center;
	white-space:nowrap;
}
</style>
<div id="footer">程序版本：<?php echo (C("cms_var")); ?>&nbsp;&nbsp;&nbsp;&nbsp;Copyright © 2017-2022 All rights reserved</div>
<script>
	//取消订单
	function concelOrder(id){
		if(confirm('确定取消该订单？')){
			$.ajax({
				 type: "POST",
				 url: "<?php echo U('Admin/Orders/cancel');?>",
				 data: {order_id:id, remark:$("#do_remark").val()},
				 dataType: "json",
				 success:function(e){
				 	if(e.result == 'ok'){
				 		alert('订单取消成功');
				 		location.reload();
				 	}else{
				 		alert('取消订单失败');
				 	}
				 }
			})
		}
	}
	//确认订单
	function confirmOrder(id){
		if(confirm('确认该订单？')){
			$.ajax({
				 type: "POST",
				 url: "<?php echo U('Admin/Orders/confirm');?>",
				 data: {order_id:id, remark:$("#do_remark").val()},
				 dataType: "json",
				 success:function(e){
				 	if(e.result == 'ok'){
				 		alert('确认订单成功');
				 		location.reload();
				 	}else{
				 		alert('确认订单失败');
				 	}
				 }
			})
		}
	}

	//发货
	function sendOrder(id){
		window.top.art.dialog.open('<?php echo U('Orders/delivery/');?>'+'&order_id='+id,{title: '设置发货', width: 600, height: 500});
	}
</script>
</body>
	</html>